package com.logos.io;

import com.logos.entity.Student;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class ObjectStream {

    public static void main(String[] args) throws IOException {
        Student student = new Student("logos",19);
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("test"));
        oos.writeObject(student);
        oos.close();
    }
}
